<?php

use yii\db\Migration;

/**
 * Class m230711_091802_delete_columns_from_project_table
 */
class m230711_091802_delete_columns_from_project_table extends Migration
{
    /**
     * {@inheritdoc}
     */
    public function safeUp()
    {
        $this->dropColumn('{{project}}', 'contract_filename');
        $this->dropColumn('{{project}}', 'contract_subject');
        $this->dropColumn('{{project}}', 'contract_price');
        $this->dropColumn('{{project}}', 'contract_registry_number');
        $this->dropColumn('{{project}}', 'contract_own_number');
    }

    /**
     * {@inheritdoc}
     */
    public function safeDown()
    {
        $this->addColumn('{{%project}}', 'contract_filename', $this->string());
        $this->addColumn('{{%project}}', 'contract_subject', $this->string(512));
        $this->addColumn('{{%project}}', 'contract_price', $this->money());
        $this->addColumn('{{%project}}', 'contract_registry_number', $this->integer());
        $this->addColumn('{{%project}}', 'contract_own_number', $this->string());
    }

}
